1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for transferring data. Still more particularly, the present invention provides a method and apparatus for copying data from one storage system to another storage system.
2. Description of Related Art
With increasingly large amounts of data being handled in data processing systems, storage systems, such as disk storage subsystems are being used to store data. Some organizations rely heavily on data and quick access to the data. Disasters caused by environmental conditions, user errors, or application errors may occur in which access to the data is lost for some period of time. Mirroring or copying data to a secondary storage system from primary storage system is currently employed to minimize the time in which access to data is lost due to a disaster.
Peer-to-peer remote copy (PPRC) is a synchronous copy mechanism that creates a copy of data at a remote or secondary storage system. This copy, at the secondary storage, is kept current with the data located at the primary storage system. In other words, a copy of the data located at a secondary storage system is kept in synch with the data at the primary storage system, as observed by the user of the data. Volume pairs are designated in which a volume in a primary system is paired with a volume in the secondary storage system. With a PPRC system, a PPRC data copy to the recovery or secondary storage system occurs synchronously from the host point of view with write operations to volumes in the primary storage system. With presently available techniques for copying data, multiple disks in a primary storage system contend for paths connecting the primary storage system to the secondary storage system. When data is written from a host to the primary storage system, the data written to a particular volume is also written to a corresponding volume in the secondary storage system using a path to the secondary storage system.
In using PPRC, a user is required to establish pairs of volumes and to terminate these pairs when recovery of data occurs. This establishment and tearing down of pairs assumes that it occurs infrequently and that a pair of volumes will persist for a relatively long time.
Although PPRC has been used to synchronize data between various subsystems on a write by write basis, another popular use of PPRC is to use this system for copying data to a remote storage system without keeping the copy made to the remote storage system in synchronization with the primary volume on the primary storage system. Currently, copying data through a PPRC storage system requires operator intensive actions to set up a PPRC pair, monitor the progress of the copy, and terminate the pair when the copy is complete. Further, the host data processing system is required to have unit control blocks (UCB) for performing the copy. The required user actions make copying from one storage system to another storage system time intensive because of the number of actions required from the user. Further, this one time copy process without synchronization also requires additional resources.
Therefore, it would be advantageous to have an improved method and apparatus for copying data from one storage system to another storage system.
The present invention provides a method and apparatus in a data processing system for copying data. A request is received to copy data from a first storage system to second storage system, wherein the request identifies a source volume on the first storage system and a target volume on the second storage system and wherein data is located on a first source volume in the first storage system. Data is transferred to a second source volume in the first storage system. A pair is automatically established between the second source volume and the target volume. The data for the request is copied from the second source volume to the target volume after the pair has been established. The pair is automatically terminated after the data has been copied to the target volume. The requester originating the request is notified of the result of the copy operation.